home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4258 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.Stanford.EDU!not-for-mail
  2. From: reckdahl@leland.Stanford.EDU (Keith Reckdahl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unbuffered character input...
  5. Date: 2 Feb 1996 14:15:25 -0800
  6. Organization: Stanford University, CA 94305, USA
  7. Message-ID: <4eu2dt$pm2@elaine18.Stanford.EDU>
  8. References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <4elf0t$5vd@ixnews2.ix.netcom.com> <4ep3a1$bee@hacgate2.hac.com>
  9. NNTP-Posting-Host: elaine18.stanford.edu
  10.  
  11. Ron Collins <collins@thor.tu.hac.com> wrote:
  12. >: >Just curious--is there a way to do unbuffered character input 
  13. >: >in c?  i.e.  getting just one character without waiting for a 
  14. >: >carriage return (enter)...
  15. >
  16. >There is no portable way to get unbuffered input, since C can't 
  17. >possibly know all about the dozens or hundreds of different 
  18. >terminal types available on all the machines made around the world.
  19.  
  20.  
  21. I understand that it is hard to make I/O code portable, but 
  22. is it truly *impossible* for C to have a portable unbuffered 
  23. input function?  Currently C has functions for many other 
  24. hard-to-port capabilities such as system calls and process 
  25. spawning.  The actual system-dependent details are left to 
  26. the compiler writers to figure out.  
  27.  
  28. Wouldn't it possible to define an ANSI-standard unbuffered 
  29. input function and then let the compiler people deal with 
  30. the individual system details?
  31.  
  32. This makes more sense than forcing each individual 
  33. programmer to re-invent the wheel by writing their own 
  34. portable unbuffered input function.
  35.  
  36. Keith
  37.  
  38.